package com.example.mylibrary;

import android.app.Dialog;
import android.content.Context;
import android.view.View;
import android.view.Window;


public class MyDialog {
    static View view;
    Dialog mShareDialog;
    Window window;

    public MyDialog(Context context) {
        mShareDialog = new Dialog(context, R.style.dialog_bottom_full);
        mShareDialog.setCanceledOnTouchOutside(true);
        mShareDialog.setCancelable(true);
        window = mShareDialog.getWindow();
        window.setWindowAnimations(R.style.share_animation);
        view = View.inflate(context, R.layout.pngdialog, null);
        window.setContentView(view);
    }

    public void setGravity(int astiUsti) {
        window.setGravity(astiUsti);
    }


    public void show() {
        mShareDialog.show();
    }


    public View yesbtn() {
        return view.findViewById(R.id.btn_comfirm);
    }
}
